home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_2 / twview93.zip / OFFLINE.PAS < prev    next >
Pascal/Delphi Source File  |  1992-06-18  |  2KB  |  97 lines

  1. { I keep forgetting to turn off 286 instruction set.  So, better force it
  2.   off here, before I confuse any more 286 people. }
  3. {$A+}        { speed up us 80x86 guys }
  4. {$B-}        { I dig short circuits }
  5. {$I+}        { pisses people off when they hit a letter, but its better than
  6.                gigo. }
  7. {$G-}        { turn OFF 286 instruction set }
  8.  
  9.  
  10.  
  11. program offline;
  12. { This will do the various sorts of computations you might want to do with
  13. your data base but while not playing.  You might plan itineraries, identify
  14. defensible structures, identify areas of control, spot high traffic areas, 
  15. and so on. }
  16.  
  17. {$I headers.inc}
  18.  
  19. var {globals}
  20.   space     : TheVoid;
  21.   BBSname   : string;
  22.   quit      : boolean;
  23.   distances : distancearray;
  24.   verbose   : boolean;
  25.  
  26. {$I misc.inc }
  27. {$I GSDATA.INC }
  28. {$I queue.inc }
  29. {$I distance.inc }
  30. {$I decount.inc }
  31. {$I control.inc }
  32. {$I status.inc }
  33. {$I textdisp.inc }
  34. {$I basepath.inc }
  35. {$I hitrffic.inc }
  36. {$I statistc.inc }
  37. {$I tour.inc }
  38. {$I multpath.inc }
  39. {$I unknown.inc }
  40. {$I oneway.inc}
  41.  
  42. procedure menu;
  43. begin
  44.   writeln;
  45.   writeln('<C>ontrolled sector status');
  46.   writeln('<D>ead end analysis');
  47.   writeln('suggest <E>therprobe targets');
  48.   writeln('visit <M>ultiple sectors efficiently');
  49.   writeln('<O>ne way warps');
  50.   writeln('<Q>uit');
  51.   writeln('<S>tellar dispersion');
  52.   writeln('<T>raffic area analysis');
  53.   writeln('<U>known sectors');
  54.   writeln('<V>isit every sector');
  55.   writeln;
  56. end; {menu}
  57.  
  58. function choice : char;
  59. var
  60.   ch : char;
  61. begin
  62.   write('(', BBSName, ') [C, D, E, M, O, Q, S, T, U, V] Your choice?  ');
  63.   readln( ch );
  64.   choice := upcase( ch );
  65. end;
  66.  
  67. begin
  68.   writeln('Tradewars Offline Data Base Inquiry program: ', version);
  69.   writeln( author );
  70.   writeln( source );
  71.   writeln;
  72.   Quit := false;
  73.   verbose := false;
  74.   InitSpace( Space );
  75.   if paramcount > 0 then
  76.     BBSName := paramstr( 1 )
  77.   else
  78.     BBSName := '';
  79.   GetData( Space, BBSName );
  80.   menu;
  81.   repeat
  82.     case choice of
  83.       'C' : Control;
  84.       'D' : DeadEndAnalysis;
  85.       'E' : SuggestEtherProbes;
  86.       'M' : MultiPassSector;
  87.       'O' : OneWaySectorList;
  88.       'Q' : quit := true;
  89.       'S' : StellarDispersion;
  90.       'T' : HighTraffic;
  91.       'U' : UnknownSectors;
  92.       'V' : VisitEverySector;
  93.     else
  94.       menu;
  95.     end; {case}
  96.   until quit;
  97. end.